n = ARGV[0].to_i

rows = (1..n).map do |row_n|
  spaces = n - row_n
  stars = row_n + (row_n - 1)
  ' ' * spaces + '*' * stars
end.join("\n")

puts rows
